package com.jihui.enterprise;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * ytx user service application
 *
 * @author candy
 */
@SpringBootApplication
@ComponentScan
@EnableDiscoveryClient
@MapperScan("com.jihui.enterprise.domain.infrastructure.domain.mapper")
@EnableAsync
public class JihuiEnterpriseServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(JihuiEnterpriseServerApplication.class, args);
    }

    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }

}